package com.hb.trade.server.project.section.service.status;

import com.hb.core.pojo.enums.SectionStatusEnum;
import com.hb.core.pojo.project.section.dto.BidSectionDTO;
import com.hb.core.pojo.project.section.entity.BidSection;
import com.hb.trade.server.project.section.service.raw.BidSectionService;
import lombok.Getter;
import lombok.Setter;
import org.springframework.stereotype.Service;

/**
 * 评标结束
 *
 * @author zhaojk
 * @deprecated 产品已经移除该状态
 */
@Setter
@Getter
@Deprecated
public class BidAccessEnd implements CalSectionStatus {

    /**
     * 排序号
     */
    private Integer sortCode = 150;

    private final BidSectionService bidSectionService;

    public BidAccessEnd(BidSectionService bidSectionService) {
        this.bidSectionService = bidSectionService;
    }

    @Override
    public Long getSectionStatus(BidSectionDTO section) {
        // 查询标段信息
        BidSection bidSection = bidSectionService.getById(section.getId());
        if (null == bidSection){
            return null;
        }
/*        Long status = bidSection.getSectionStatus();
        if (status.equals(SectionStatusEnum.BID_ASSESS_END.getId())){
            return SectionStatusEnum.BID_ASSESS_END.getId();
        }*/
        return null;
    }

    @Override
    public Integer getSort() {
        return sortCode;
    }

}
